Remove unnecessary image-missing fallbacks
authorAlexander Larsson <alexl@redhat.com>
Thu, 6 Feb 2020 08:50:04 +0000 (09:50 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 6 Feb 2020 08:50:04 +0000 (09:50 +0100)
We now always return something from icon theme lookups, so no need to
do custom fallbacks.

gtk/gtkcssimageicontheme.c
gtk/gtkiconhelper.c

index 4a3ea9ce1b1a78fc3582a3e9d8017012fbdc1b55..c886e2447cf1b8831dfd31fd54d8c01178f807c8 100644 (file)
@@ -68,13 +68,6 @@ gtk_css_image_icon_theme_snapshot (GtkCssImage *image,
                                          icon_theme->scale,
                                          GTK_TEXT_DIR_NONE,
                                          0);
-      if (icon == NULL)
-        icon = gtk_icon_theme_lookup_icon (icon_theme->icon_theme,
-                                           "image-missing",
-                                           NULL,
-                                           size, icon_theme->scale,
-                                           GTK_TEXT_DIR_NONE,
-                                           0);
 
       g_assert (icon != NULL);
 
index eb6f715527009a47a036e4a6384b8a93a255ce58..82ea7add2ea2a32aaffc3c8b6334efdc17ec0d07 100644 (file)
@@ -105,13 +105,6 @@ ensure_paintable_for_gicon (GtkIconHelper    *self,
                                          MIN (width, height),
                                          dir,
                                          scale, flags);
-  if (icon == NULL)
-    icon = gtk_icon_theme_lookup_icon (icon_theme,
-                                       "image-missing",
-                                       NULL,
-                                       width, scale,
-                                       dir,
-                                       flags);
 
   *symbolic = gtk_icon_paintable_is_symbolic (icon);
   return GDK_PAINTABLE (icon);